﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using FangDuShi_Admin.DBUtility;
namespace FangDuShi_Admin.DAL
{
	/// <summary>
	/// 数据访问类:HouseSrcInfoWebDC
	/// </summary>
	public partial class HouseSrcInfoWebDC
	{
		public HouseSrcInfoWebDC()
		{}
		#region  BasicMethod

		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(decimal FHouseSrcInfoID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) from t_HouseSrcInfoWebDC");
			strSql.Append(" where FHouseSrcInfoID=@FHouseSrcInfoID");
			SqlParameter[] parameters = {
					new SqlParameter("@FHouseSrcInfoID", SqlDbType.Decimal)
			};
			parameters[0].Value = FHouseSrcInfoID;

			return DbHelperSQL.Exists(strSql.ToString(),parameters);
		}


		/// <summary>
		/// 增加一条数据
		/// </summary>
		public decimal Add(FangDuShi_Admin.Model.HouseSrcInfoWebDC model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into t_HouseSrcInfoWebDC(");
			strSql.Append("FRentSale,FDistrictNo3,FDistrictNo4,FDistrictNo5,FAddr,FArea,FFloor,FTotalFloor,FRoomNum,FParlorNum,FToiletNum,FPrice,FNote,FTitle,FHouseOwner,FIsTelText,FHouseOwnerTelText,FHouseOwnerTelPic,FDCSource,FDCURL,FDCDate,FWebRegDate,FWebValidDate,FWebUpdDate,FLookCnt)");
			strSql.Append(" values (");
			strSql.Append("@FRentSale,@FDistrictNo3,@FDistrictNo4,@FDistrictNo5,@FAddr,@FArea,@FFloor,@FTotalFloor,@FRoomNum,@FParlorNum,@FToiletNum,@FPrice,@FNote,@FTitle,@FHouseOwner,@FIsTelText,@FHouseOwnerTelText,@FHouseOwnerTelPic,@FDCSource,@FDCURL,@FDCDate,@FWebRegDate,@FWebValidDate,@FWebUpdDate,@FLookCnt)");
			strSql.Append(";select @@IDENTITY");
			SqlParameter[] parameters = {
					new SqlParameter("@FRentSale", SqlDbType.NVarChar,1),
					new SqlParameter("@FDistrictNo3", SqlDbType.NVarChar,10),
					new SqlParameter("@FDistrictNo4", SqlDbType.NVarChar,10),
					new SqlParameter("@FDistrictNo5", SqlDbType.NVarChar,10),
					new SqlParameter("@FAddr", SqlDbType.NVarChar,80),
					new SqlParameter("@FArea", SqlDbType.Decimal,13),
					new SqlParameter("@FFloor", SqlDbType.Decimal,5),
					new SqlParameter("@FTotalFloor", SqlDbType.Decimal,5),
					new SqlParameter("@FRoomNum", SqlDbType.Int,4),
					new SqlParameter("@FParlorNum", SqlDbType.Int,4),
					new SqlParameter("@FToiletNum", SqlDbType.Int,4),
					new SqlParameter("@FPrice", SqlDbType.Decimal,13),
					new SqlParameter("@FNote", SqlDbType.NVarChar,-1),
					new SqlParameter("@FTitle", SqlDbType.NVarChar,200),
					new SqlParameter("@FHouseOwner", SqlDbType.NVarChar,40),
					new SqlParameter("@FIsTelText", SqlDbType.NVarChar,1),
					new SqlParameter("@FHouseOwnerTelText", SqlDbType.NVarChar,40),
					new SqlParameter("@FHouseOwnerTelPic", SqlDbType.VarBinary,-1),
					new SqlParameter("@FDCSource", SqlDbType.NVarChar,20),
					new SqlParameter("@FDCURL", SqlDbType.NVarChar,255),
					new SqlParameter("@FDCDate", SqlDbType.DateTime),
					new SqlParameter("@FWebRegDate", SqlDbType.DateTime),
					new SqlParameter("@FWebValidDate", SqlDbType.DateTime),
					new SqlParameter("@FWebUpdDate", SqlDbType.DateTime),
					new SqlParameter("@FLookCnt", SqlDbType.Int,4)};
			parameters[0].Value = model.FRentSale;
			parameters[1].Value = model.FDistrictNo3;
			parameters[2].Value = model.FDistrictNo4;
			parameters[3].Value = model.FDistrictNo5;
			parameters[4].Value = model.FAddr;
			parameters[5].Value = model.FArea;
			parameters[6].Value = model.FFloor;
			parameters[7].Value = model.FTotalFloor;
			parameters[8].Value = model.FRoomNum;
			parameters[9].Value = model.FParlorNum;
			parameters[10].Value = model.FToiletNum;
			parameters[11].Value = model.FPrice;
			parameters[12].Value = model.FNote;
			parameters[13].Value = model.FTitle;
			parameters[14].Value = model.FHouseOwner;
			parameters[15].Value = model.FIsTelText;
			parameters[16].Value = model.FHouseOwnerTelText;
			parameters[17].Value = model.FHouseOwnerTelPic;
			parameters[18].Value = model.FDCSource;
			parameters[19].Value = model.FDCURL;
			parameters[20].Value = model.FDCDate;
			parameters[21].Value = model.FWebRegDate;
			parameters[22].Value = model.FWebValidDate;
			parameters[23].Value = model.FWebUpdDate;
			parameters[24].Value = model.FLookCnt;

			object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
			if (obj == null)
			{
				return 0;
			}
			else
			{
				return Convert.ToDecimal(obj);
			}
		}
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public bool Update(FangDuShi_Admin.Model.HouseSrcInfoWebDC model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("update t_HouseSrcInfoWebDC set ");
			strSql.Append("FRentSale=@FRentSale,");
			strSql.Append("FDistrictNo3=@FDistrictNo3,");
			strSql.Append("FDistrictNo4=@FDistrictNo4,");
			strSql.Append("FDistrictNo5=@FDistrictNo5,");
			strSql.Append("FAddr=@FAddr,");
			strSql.Append("FArea=@FArea,");
			strSql.Append("FFloor=@FFloor,");
			strSql.Append("FTotalFloor=@FTotalFloor,");
			strSql.Append("FRoomNum=@FRoomNum,");
			strSql.Append("FParlorNum=@FParlorNum,");
			strSql.Append("FToiletNum=@FToiletNum,");
			strSql.Append("FPrice=@FPrice,");
			strSql.Append("FNote=@FNote,");
			strSql.Append("FTitle=@FTitle,");
			strSql.Append("FHouseOwner=@FHouseOwner,");
			strSql.Append("FIsTelText=@FIsTelText,");
			strSql.Append("FHouseOwnerTelText=@FHouseOwnerTelText,");
			strSql.Append("FHouseOwnerTelPic=@FHouseOwnerTelPic,");
			strSql.Append("FDCSource=@FDCSource,");
			strSql.Append("FDCURL=@FDCURL,");
			strSql.Append("FDCDate=@FDCDate,");
			strSql.Append("FWebRegDate=@FWebRegDate,");
			strSql.Append("FWebValidDate=@FWebValidDate,");
			strSql.Append("FWebUpdDate=@FWebUpdDate,");
			strSql.Append("FLookCnt=@FLookCnt");
			strSql.Append(" where FHouseSrcInfoID=@FHouseSrcInfoID");
			SqlParameter[] parameters = {
					new SqlParameter("@FRentSale", SqlDbType.NVarChar,1),
					new SqlParameter("@FDistrictNo3", SqlDbType.NVarChar,10),
					new SqlParameter("@FDistrictNo4", SqlDbType.NVarChar,10),
					new SqlParameter("@FDistrictNo5", SqlDbType.NVarChar,10),
					new SqlParameter("@FAddr", SqlDbType.NVarChar,80),
					new SqlParameter("@FArea", SqlDbType.Decimal,13),
					new SqlParameter("@FFloor", SqlDbType.Decimal,5),
					new SqlParameter("@FTotalFloor", SqlDbType.Decimal,5),
					new SqlParameter("@FRoomNum", SqlDbType.Int,4),
					new SqlParameter("@FParlorNum", SqlDbType.Int,4),
					new SqlParameter("@FToiletNum", SqlDbType.Int,4),
					new SqlParameter("@FPrice", SqlDbType.Decimal,13),
					new SqlParameter("@FNote", SqlDbType.NVarChar,-1),
					new SqlParameter("@FTitle", SqlDbType.NVarChar,200),
					new SqlParameter("@FHouseOwner", SqlDbType.NVarChar,40),
					new SqlParameter("@FIsTelText", SqlDbType.NVarChar,1),
					new SqlParameter("@FHouseOwnerTelText", SqlDbType.NVarChar,40),
					new SqlParameter("@FHouseOwnerTelPic", SqlDbType.VarBinary,-1),
					new SqlParameter("@FDCSource", SqlDbType.NVarChar,20),
					new SqlParameter("@FDCURL", SqlDbType.NVarChar,255),
					new SqlParameter("@FDCDate", SqlDbType.DateTime),
					new SqlParameter("@FWebRegDate", SqlDbType.DateTime),
					new SqlParameter("@FWebValidDate", SqlDbType.DateTime),
					new SqlParameter("@FWebUpdDate", SqlDbType.DateTime),
					new SqlParameter("@FLookCnt", SqlDbType.Int,4),
					new SqlParameter("@FHouseSrcInfoID", SqlDbType.Decimal,13)};
			parameters[0].Value = model.FRentSale;
			parameters[1].Value = model.FDistrictNo3;
			parameters[2].Value = model.FDistrictNo4;
			parameters[3].Value = model.FDistrictNo5;
			parameters[4].Value = model.FAddr;
			parameters[5].Value = model.FArea;
			parameters[6].Value = model.FFloor;
			parameters[7].Value = model.FTotalFloor;
			parameters[8].Value = model.FRoomNum;
			parameters[9].Value = model.FParlorNum;
			parameters[10].Value = model.FToiletNum;
			parameters[11].Value = model.FPrice;
			parameters[12].Value = model.FNote;
			parameters[13].Value = model.FTitle;
			parameters[14].Value = model.FHouseOwner;
			parameters[15].Value = model.FIsTelText;
			parameters[16].Value = model.FHouseOwnerTelText;
			parameters[17].Value = model.FHouseOwnerTelPic;
			parameters[18].Value = model.FDCSource;
			parameters[19].Value = model.FDCURL;
			parameters[20].Value = model.FDCDate;
			parameters[21].Value = model.FWebRegDate;
			parameters[22].Value = model.FWebValidDate;
			parameters[23].Value = model.FWebUpdDate;
			parameters[24].Value = model.FLookCnt;
			parameters[25].Value = model.FHouseSrcInfoID;

			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		/// 删除一条数据
		/// </summary>
		public bool Delete(decimal FHouseSrcInfoID)
		{
			
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from t_HouseSrcInfoWebDC ");
			strSql.Append(" where FHouseSrcInfoID=@FHouseSrcInfoID");
			SqlParameter[] parameters = {
					new SqlParameter("@FHouseSrcInfoID", SqlDbType.Decimal)
			};
			parameters[0].Value = FHouseSrcInfoID;

			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		/// <summary>
		/// 批量删除数据
		/// </summary>
		public bool DeleteList(string FHouseSrcInfoIDlist )
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from t_HouseSrcInfoWebDC ");
			strSql.Append(" where FHouseSrcInfoID in ("+FHouseSrcInfoIDlist + ")  ");
			int rows=DbHelperSQL.ExecuteSql(strSql.ToString());
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}


		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public FangDuShi_Admin.Model.HouseSrcInfoWebDC GetModel(decimal FHouseSrcInfoID)
		{
			
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select  top 1 FHouseSrcInfoID,FRentSale,FDistrictNo3,FDistrictNo4,FDistrictNo5,FAddr,FArea,FFloor,FTotalFloor,FRoomNum,FParlorNum,FToiletNum,FPrice,FNote,FTitle,FHouseOwner,FIsTelText,FHouseOwnerTelText,FHouseOwnerTelPic,FDCSource,FDCURL,FDCDate,FWebRegDate,FWebValidDate,FWebUpdDate,FLookCnt from t_HouseSrcInfoWebDC ");
			strSql.Append(" where FHouseSrcInfoID=@FHouseSrcInfoID");
			SqlParameter[] parameters = {
					new SqlParameter("@FHouseSrcInfoID", SqlDbType.Decimal)
			};
			parameters[0].Value = FHouseSrcInfoID;

			FangDuShi_Admin.Model.HouseSrcInfoWebDC model=new FangDuShi_Admin.Model.HouseSrcInfoWebDC();
			DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				return DataRowToModel(ds.Tables[0].Rows[0]);
			}
			else
			{
				return null;
			}
		}


		

		/// <summary>
		/// 获得数据列表
		/// </summary>
		public DataSet GetList(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select FHouseSrcInfoID,FRentSale,FDistrictNo3,FDistrictNo4,FDistrictNo5,FAddr,FArea,FFloor,FTotalFloor,FRoomNum,FParlorNum,FToiletNum,FPrice,FNote,FTitle,FHouseOwner,FIsTelText,FHouseOwnerTelText,FHouseOwnerTelPic,FDCSource,FDCURL,FDCDate,FWebRegDate,FWebValidDate,FWebUpdDate,FLookCnt ");
			strSql.Append(" FROM t_HouseSrcInfoWebDC ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			return DbHelperSQL.Query(strSql.ToString());
		}

		/// <summary>
		/// 获得前几行数据
		/// </summary>
		public DataSet GetList(int Top,string strWhere,string filedOrder)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select ");
			if(Top>0)
			{
				strSql.Append(" top "+Top.ToString());
			}
			strSql.Append(" FHouseSrcInfoID,FRentSale,FDistrictNo3,FDistrictNo4,FDistrictNo5,FAddr,FArea,FFloor,FTotalFloor,FRoomNum,FParlorNum,FToiletNum,FPrice,FNote,FTitle,FHouseOwner,FIsTelText,FHouseOwnerTelText,FHouseOwnerTelPic,FDCSource,FDCURL,FDCDate,FWebRegDate,FWebValidDate,FWebUpdDate,FLookCnt ");
			strSql.Append(" FROM t_HouseSrcInfoWebDC ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			strSql.Append(" order by " + filedOrder);
			return DbHelperSQL.Query(strSql.ToString());
		}

		/// <summary>
		/// 获取记录总数
		/// </summary>
		public int GetRecordCount(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) FROM t_HouseSrcInfoWebDC ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			object obj = DbHelperSQL.GetSingle(strSql.ToString());
			if (obj == null)
			{
				return 0;
			}
			else
			{
				return Convert.ToInt32(obj);
			}
		}
		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("SELECT * FROM ( ");
			strSql.Append(" SELECT ROW_NUMBER() OVER (");
			if (!string.IsNullOrEmpty(orderby.Trim()))
			{
				strSql.Append("order by T." + orderby );
			}
			else
			{
				strSql.Append("order by T.FHouseSrcInfoID desc");
			}
			strSql.Append(")AS Row, T.*  from t_HouseSrcInfoWebDC T ");
			if (!string.IsNullOrEmpty(strWhere.Trim()))
			{
				strSql.Append(" WHERE " + strWhere);
			}
			strSql.Append(" ) TT");
			strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
			return DbHelperSQL.Query(strSql.ToString());
		}

		/*
		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
		{
			SqlParameter[] parameters = {
					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
					new SqlParameter("@PageSize", SqlDbType.Int),
					new SqlParameter("@PageIndex", SqlDbType.Int),
					new SqlParameter("@IsReCount", SqlDbType.Bit),
					new SqlParameter("@OrderType", SqlDbType.Bit),
					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
					};
			parameters[0].Value = "t_HouseSrcInfoWebDC";
			parameters[1].Value = "FHouseSrcInfoID";
			parameters[2].Value = PageSize;
			parameters[3].Value = PageIndex;
			parameters[4].Value = 0;
			parameters[5].Value = 0;
			parameters[6].Value = strWhere;	
			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
		}*/

		#endregion  BasicMethod


		#region  已经使用的

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetListByView(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(@"SELECT FHouseSrcInfoID ,
        FTitle ,
        FDCSource ,
        FDCURL ,
        FRentSale ,
        FDistrictNo5 ,
        DoorModel ,
        FArea ,
        FDCDate FROM dbo.v_HouseSrcInfoWebDC ");
            strSql.Append(" FROM v_HouseSrcInfoWebDC ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public FangDuShi_Admin.Model.HouseSrcInfoWebDC DataRowToModel(DataRow row)
        {
            FangDuShi_Admin.Model.HouseSrcInfoWebDC model = new FangDuShi_Admin.Model.HouseSrcInfoWebDC();
            if (row != null)
            {
                if (row["FHouseSrcInfoID"] != null && row["FHouseSrcInfoID"].ToString() != "")
                {
                    model.FHouseSrcInfoID = decimal.Parse(row["FHouseSrcInfoID"].ToString());
                }
                if (row["FRentSale"] != null)
                {
                    model.FRentSale = row["FRentSale"].ToString();
                }
                if (row.Table.Columns.Contains("FDistrictNo3"))
                {
                    if (row["FDistrictNo3"] != null)
                    {
                        model.FDistrictNo3 = row["FDistrictNo3"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FDistrictNo4"))
                {
                    if (row["FDistrictNo4"] != null)
                    {
                        model.FDistrictNo4 = row["FDistrictNo4"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FDistrictNo5"))
                {
                    if (row["FDistrictNo5"] != null)
                    {
                        model.FDistrictNo5 = row["FDistrictNo5"].ToString();
                    }
                }
                if (row["FAddr"] != null)
                {
                    model.FAddr = row["FAddr"].ToString();
                }
                if (row["FArea"] != null && row["FArea"].ToString() != "")
                {
                    model.FArea = decimal.Parse(row["FArea"].ToString());
                }
                if (row.Table.Columns.Contains("FFloor"))
                {
                    if (row["FFloor"] != null && row["FFloor"].ToString() != "")
                    {
                        model.FFloor = decimal.Parse(row["FFloor"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("FTotalFloor"))
                {
                    if (row["FTotalFloor"] != null && row["FTotalFloor"].ToString() != "")
                    {
                        model.FTotalFloor = decimal.Parse(row["FTotalFloor"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("FRoomNum"))
                {
                    if (row["FRoomNum"] != null && row["FRoomNum"].ToString() != "")
                    {
                        model.FRoomNum = int.Parse(row["FRoomNum"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("FParlorNum"))
                {
                    if (row["FParlorNum"] != null && row["FParlorNum"].ToString() != "")
                    {
                        model.FParlorNum = int.Parse(row["FParlorNum"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("FToiletNum"))
                {
                    if (row["FToiletNum"] != null && row["FToiletNum"].ToString() != "")
                    {
                        model.FToiletNum = int.Parse(row["FToiletNum"].ToString());
                    }
                }
                if (row["FPrice"] != null && row["FPrice"].ToString() != "")
                {
                    model.FPrice = decimal.Parse(row["FPrice"].ToString());
                }
                if (row.Table.Columns.Contains("FNote"))
                {
                    if (row["FNote"] != null)
                    {
                        model.FNote = row["FNote"].ToString();
                    }
                }
                if (row["FTitle"] != null)
                {
                    model.FTitle = row["FTitle"].ToString();
                }
                if (row.Table.Columns.Contains("FHouseOwner"))
                {
                    if (row["FHouseOwner"] != null)
                    {
                        model.FHouseOwner = row["FHouseOwner"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FIsTelText"))
                {
                    if (row["FIsTelText"] != null)
                    {
                        model.FIsTelText = row["FIsTelText"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FHouseOwnerTelText"))
                {
                    if (row["FHouseOwnerTelText"] != null)
                    {
                        model.FHouseOwnerTelText = row["FHouseOwnerTelText"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FHouseOwnerTelPic"))
                {
                    if (row["FHouseOwnerTelPic"] != null && row["FHouseOwnerTelPic"].ToString() != "")
                    {
                        model.FHouseOwnerTelPic = (byte[])row["FHouseOwnerTelPic"];
                    }
                }
                if (row.Table.Columns.Contains("FDCSource"))
                {
                    if (row["FDCSource"] != null)
                    {
                        model.FDCSource = row["FDCSource"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FDCURL"))
                {
                    if (row["FDCURL"] != null)
                    {
                        model.FDCURL = row["FDCURL"].ToString();
                    }
                }
                if (row.Table.Columns.Contains("FDCDate"))
                {
                    if (row["FDCDate"] != null && row["FDCDate"].ToString() != "")
                    {
                        model.FDCDate = DateTime.Parse(row["FDCDate"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("FWebRegDate"))
                {
                    if (row["FWebRegDate"] != null && row["FWebRegDate"].ToString() != "")
                    {
                        model.FWebRegDate = DateTime.Parse(row["FWebRegDate"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("FWebValidDate"))
                {
                    if (row["FWebValidDate"] != null && row["FWebValidDate"].ToString() != "")
                    {
                        model.FWebValidDate = DateTime.Parse(row["FWebValidDate"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("FWebUpdDate"))
                {
                    if (row["FWebUpdDate"] != null && row["FWebUpdDate"].ToString() != "")
                    {
                        model.FWebUpdDate = DateTime.Parse(row["FWebUpdDate"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("FLookCnt"))
                {
                    if (row["FLookCnt"] != null && row["FLookCnt"].ToString() != "")
                    {
                        model.FLookCnt = int.Parse(row["FLookCnt"].ToString());
                    }
                }
                if (row.Table.Columns.Contains("DoorModel"))
                {
                    if (row["DoorModel"] != null && row["DoorModel"].ToString() != "")
                    {
                        model.DoorModel = int.Parse(row["DoorModel"].ToString());
                    }
                }
            }
            return model;
        }

        

        #endregion  已经使用的
    }
}

